In order to move a tool through a three dimensional space and along a predetermined path to do work continuously or at certain locations, it is necessary to program a computer. In prior art practices, this has been accomplished by moving the tool along the surface of the path through which the tool is to be moved while feeding programming information to the computer. One problem associated with this method is that the tool may strike obstacles in the path causing undesirable changes in the angular relationship of the tool to the surface so that the tool would not perform its work properly at such locations. Also, the tool could be damaged. It has been proposed to secure a teaching device to the tool so as to protect the tool while being moved along the path and in contact with the surface. Such a device, while protecting the tool, still suffered the drawback of inadvertantly changing the angular relationship of the tool or even moving it too far out of the intended path if an obstacle was encountered. Also, the structure of the teaching device sometimes prevented the positioning of the tool at the desired angular relationship.